package demo1;

import java.util.ArrayList;
import java.util.Collection;

public class userDemo {
    public static void main(String[] args) {
        user[] users = new user[3];
        users[0] = new user(18, "勇敢");
        users[1] = new user(23, "周朋");
        users[2] = new user(25, "毛利");
        for (int i = 0; i < users.length; i++) {
            System.out.println(users[i]);
        }

        Collection coll = new ArrayList();
        coll.add("aaa");
        coll.add(new user(26, "123"));
        coll.add(true);
        System.out.println(coll);
    }
}
